//
// Created by EDZ on 2022/1/5.
//

#ifndef BASIC_EXCEPTION_H
#define BASIC_EXCEPTION_H

#include <exception>
#include <string>

void exception_int();

void exception_obj();

void func_exception();

class bad_age_error : public std::exception {
private:
    std::string error;
public:
    bad_age_error(const char* str) : error{str} {}

    virtual ~bad_age_error() {}

    virtual const char *what() const throw();

};

#endif //BASIC_EXCEPTION_H
